package com.DHT;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ServerNode {

    private String ip;

    //节点存放的数据
    private List<String> data = new ArrayList<>();


    public void addData(String data) {
        this.data.add(data);
    }


    public void ListData() {
        System.out.println(Arrays.toString(data.toArray()));
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public ServerNode(String ip) {
        this.ip = ip;
    }
}
